package ru.jexp.rcp.supply.actions.wizards;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.IWorkbenchWindow;

import ru.jexp.rcp.supply.beans.zs.wizard.NewWizardZs;
import ru.jexp.rcp.supply.img.JExpImageLink;
import ru.jexp.rcp.supply.mui.JExpSupplyMessages;

public class ActionNewWizardZs extends Action {

	public static final String ID = "ru.jexp.rcp.supply.actions.wizards.actionnewwizardzs";

	private IWorkbenchWindow window;

	public ActionNewWizardZs(IWorkbenchWindow window) {
		super(JExpSupplyMessages.Zs_wizard_action_text);
		this.window = window;
		setId(ID);
		setActionDefinitionId(ID);
		setText(JExpSupplyMessages.Zs_wizard_action_text);
		setToolTipText(JExpSupplyMessages.Zs_wizard_action_tooltip);
		setImageDescriptor(JExpImageLink.getImageDescriptor(JExpImageLink.ZS));
	}

	@Override
	public void run() {
		NewWizardZs wizard = new NewWizardZs();
		wizard.init(window.getWorkbench(), null);
		WizardDialog dialogZs = new WizardDialog(window.getShell(), wizard);
		dialogZs.open();
	}
}
